import httpAxios from '../utils/httpAxios'

// 分页获取管理员
export const getadmin = (data: object) => {
    return httpAxios.post('/getadmin', data)
}

// 获取所有管理员
export const getadminlist = () => {
    return httpAxios.get('/getadminlist')
}

// 新增管理员
export const addadmin = (data: object) => {
    return httpAxios.post('/addadmin', data)
}

// 搜索管理员
export const searchadmin = (name: string) => {
    return httpAxios.post('/searchadmin', { name })
}

// 修改管理员
export const editadmin = (data: object) => {
    return httpAxios.post('/updateadmin', data)
}

// 删除管理员
export const deladmin = (id: number) => {
    return httpAxios.post('/deladmin', { id })
}